package team.seekers.hula.island.post.entity.dao;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import team.seekers.hula.common.entity.BaseDO;

import java.util.Date;

/**
 * @author ekin
 * @Description GOOD
 * @mood happy
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName(IslandPostDOField.TABLE_NAME)
public class IslandPostDO extends BaseDO {
    private static final long serialVersionUID = 1L;

    @TableId(value = IslandPostDOField.ID, type = IdType.ASSIGN_ID)
    private String id;

    @TableField(IslandPostDOField.USER_ID)
    private String userId;

    @TableField(IslandPostDOField.ISLAND_ID)
    private String islandId;

    @ApiModelProperty(value = "帖子内容")
    @TableField(IslandPostDOField.CONTENT)
    private String content;

    @ApiModelProperty(value = "浪屿绑定的知桨id集合")
    @TableField(IslandPostDOField.LINKS)
    private String links;

    /**
     * 帖子图片
     */
    @TableField(IslandPostDOField.PICTURES)
    private String pictures;

    /**
     * 给帖子点赞的用户
     */
    @TableField(IslandPostDOField.LIKE_USERS)
    private String likeUsers;

    /**
     * 帖子标题
     */
    @TableField(IslandPostDOField.TITLE)
    private String title;

    /**
     *
     * 可见性
     */
    @TableField(IslandPostDOField.VISIBILITY)
    private Integer visibility;

    /**
     * 帖子定位
     */
    @TableField(IslandPostDOField.LOCATION)
    private String location;

    /**
     * 帖子类型
     */
    @TableField(IslandPostDOField.TYPE)
    private Integer type;

    /**
     * 帖子点赞数
     */
    @TableField(IslandPostDOField.LIKE)
    private Integer likeCount;

    /**
     * 帖子评论数
     */
    @TableField(IslandPostDOField.COMMENT_COUNT)
    private Integer commentCount;

    @TableField(IslandPostDOField.DELETED)
    @TableLogic
    private Integer deleted;

    /**
     * 帖子是否草稿
     */
    @TableField(IslandPostDOField.DRAFT)
    private Integer isDraft;

    @TableField(value = IslandPostDOField.GMT_CREATE, fill = FieldFill.INSERT)
    private Date gmtCreate;

    @TableField(value = IslandPostDOField.GMT_MODIFIED, fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;
}
